<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
	    
	</head>
	<body>
		<script src="Public/js/jquery-1.7.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				//点击关闭图片按钮

				$('.close_img').click(function(){
					//删除图片元素
					var str = '<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file" name="blogo">';
					$('#upload_box').html(str);
				})
			})
		</script>
		<form action="" method="post" enctype="multipart/form-data">
		<div class="alert alert-success">添加品牌</div>
		<div class="form-group">
			<label for="exampleInputEmail1">品牌名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" value="{{$oldData['bname']}}" name="bname">
		</div>
		<div class="form-group" id="upload_box">
			<!--如果有缩略图的时候-->
			{{if value="$oldData['blogo']"}}
				<img src="{{$oldData['blogo']}}" width="200"/>
				<a href="javascript:;" class="close_img">X</a>
				<input type="hidden" name="logo" value="{{$oldData['blogo']}}"/>
			{{else}}
				<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file" name="blogo">
			{{endif}}
		</div>
		<div class="form-group">是否热门
			{{if value="$oldData['bhot']"}}
			<input type="radio" checked="checked" name="bhot" value="1" />是
			<input type="radio" name="bhot" value="0" />否
			{{else}}
			<input type="radio" name="bhot" value="1" />是
			<input type="radio" checked="checked" name="bhot" value="0" />否
			{{endif}}
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" value="{{$oldData['bscort']}}" name="bscort" value="100" rule="regexp:/^\d+$/" msg="您输入的不是一个数字">
		</div>
		<input type="hidden" name="bid" value="{{$oldData['bid']}}"/>
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
		</form>
	</body>
</html>
